﻿using System;

namespace LoRel
{
    public class InvalidProxyException : Exception {
        private readonly Type m_AttemptedProxy;
        private readonly ColumnReference m_FailedColumn;
        public InvalidProxyException( Type attempted_proxy, ColumnReference failed_column ) : 
            base( "Type does not have required Property or Property type mismatch:" + failed_column.Name ) {
            m_AttemptedProxy = attempted_proxy;
            m_FailedColumn = failed_column;
        }

        public Type AttemptedProxy { get { return m_AttemptedProxy; } }
        public ColumnReference FailedColumn { get { return m_FailedColumn; } }
    }
}
